cmake_minimum_required(VERSION 3.20)

set(ProjectName "UseProtoBuffer")
project(${ProjectName})

set(SOURCES
	include/t_protobuf.h
	include/student.pb.h
	include/student.pb.cc
	main.cpp)

find_package(protobuf CONFIG REQUIRED)

add_executable(${ProjectName} ${SOURCES})

target_link_libraries(${ProjectName} PRIVATE protobuf::libprotoc protobuf::libprotobuf protobuf::libprotobuf-lite)

#-DCMAKE_TOOLCHAIN_FILE=D:/work/MyWorkCode/GitSource/vcpkg/scripts/buildsystems/vcpkg.cmake